import java.text.SimpleDateFormat;
import java.util.Date;

public class ThreadDemo_sleep {
    public static void main(String[] args) throws InterruptedException {
        SimpleDateFormat formatter= new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");


        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("我是子线程");
            }
        });
        Date date1 = new Date(System.currentTimeMillis());
        System.out.println(formatter.format(date1));
        thread.start();
        //System.out.println(System.currentTimeMillis());
        Thread.sleep(3000);
        Date date2 = new Date(System.currentTimeMillis());
        System.out.println(formatter.format(date2));
        //System.out.println(System.currentTimeMillis());

    }
}
